<template>
	<div class="header">
		<img class="banner" :src="rst.bannerUrl" alt="" v-if="showHader">
	</div>
</template>

<script>
export default{
	name: 'HomeHeader',
	props: ["rst"],
  data() {
    return {
      showHader: true
    }
  },
  methods: {
    topScroll() {
      if(this.SearchView != false){
        var top = document.documentElement.scrollTop || document.body.scrollTop || window.pageYOffset
        if(top > 100) {
          this.showHader = false
        }else{
          this.showHader = true
        }
      }
    }
  },
  created() {
    window.addEventListener("scroll", this.topScroll)
  }
}
</script>

<style scoped>
.header{ position: fixed; z-index: -1;}
.header .banner{ width: 100%; position: fixed; left: 0; right: 0; top: 0;}
</style>
